import { Application } from 'egg';

export default (app: Application) => {
    const { CHAR, STRING } = app.Sequelize;
    const model = app.model.define('ActivityEnroll', {
        activity_enroll_id: { type: CHAR(32), primaryKey: true },//主键
        activity_id: CHAR(32),//活动id
        user_id: CHAR(32),//参与用户id
        phone: STRING(15),//手机号
        weChat_account: STRING(20),//微信号
        activity_enroll_status: CHAR(1),//参与状态（1：参与，2：拒绝，3：取消）
        created_by: CHAR(32),
        updated_by: CHAR(32),
        is_delete: CHAR(1),
    }, { tableName: 't_activity_enroll' });
    return model;
};

export class ActivityEnroll {
    activity_enroll_id: string;
    activity_id: string;
    user_id: string;
    phone: string;
    weChat_account: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}
